% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/popshare_xyz.R
\name{popshare_at_top_x_pct}
\alias{popshare_at_top_x_pct}
\title{top X percent of sites account for what percent of residents?}
\usage{
popshare_at_top_x_pct(pop, x = 0.2, astext = FALSE, dig = 0)
}
\arguments{
\item{pop}{vector of population totals across places,
like out$results_bysite$pop where out is the output of ejamit()}

\item{x}{a fraction of 1, the share of all places (or a vector of values)}

\item{astext}{if TRUE, return text of description of results}

\item{dig}{rounding digits for text output}
}
\value{
A fraction of 1 (or a vector of results) or text
}
\description{
What fraction of total population is accounted for by the top X percent of places?
}
\examples{
 x <- testdata_ejamit_output_100pts_1miles$results_bysite
 popshare_p_lives_at_what_pct(x$pop, p = 0.50, astext=TRUE)
 popshare_p_lives_at_what_n(  x$pop, p = c(0.50, 0.67, 0.80, 0.95))
 popshare_at_top_x_pct(       x$pop, x = c(0.25, 0.50, .90))
 popshare_at_top_n(           x$pop, n = c(1, 5, 10))
 
}
